package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.VesselDao;
import com.home.qh.model.Vessel;
import com.home.qh.service.VesselManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("vesselManager")
public class VesselManagerImpl extends GenericManagerImpl<Vessel, Long> implements VesselManager {
	VesselDao vesselDao;

    @Autowired
    public VesselManagerImpl(VesselDao vesselDao) {
        super(vesselDao);
        this.vesselDao = vesselDao;
    }

	public List<Vessel> getVesselByCodeAndName(String vesselCode,
			String vesselName) {
		return vesselDao.getVesselByCodeAndName(vesselCode, vesselName);
	}

	public List<Vessel> getVesselByVessel(Vessel vessel, String sort, boolean desc, int startResult, int maxResults) {
		return vesselDao.getVesselByVessel(vessel, sort, desc, startResult, maxResults);
	}

}